from typing import List


class Solution:
    def numOfUnplacedFruits(self, fruits: List[int], baskets: List[int]) -> int:
        ret = len(fruits)
        flag = [0] * ret
        for fruit in fruits:
            for idx in range(0, len(baskets)):
                if fruit <= baskets[idx] and flag[idx] == 0:
                    flag[idx] = 1
                    ret -= 1
                    break
        return ret
